package com.accp.demo.service.stock;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.accp.demo.mapper.stock.IStockLedgerMapper;
import com.accp.demo.pojo.stock.StockLedger;

@Service
public class StockLedgerService {

		@Autowired
		private IStockLedgerMapper iStockLedgerMapper;
		
		
		/**
		 * 库存总账新增
		 * @param stockLedger
		 */
		public void insert(StockLedger stockLedger){
			iStockLedgerMapper.insert(stockLedger);
		}
		
		/**
		 * 库存总账逻辑删除
		 * @param wareNo
		 * @param materialNo
		 */
		public void delete(int wareNo,String materialNo){
			iStockLedgerMapper.delete(wareNo, materialNo);
		}
		
		
		public void update(StockLedger stockLedger){
			iStockLedgerMapper.update(stockLedger);
		}
		
		public StockLedger findByWareNoNoAndMaterialNo(int wareNo,String materialNo){
			return iStockLedgerMapper.findByWareNoNoAndMaterialNo(wareNo, materialNo);
		}
}
